import 'package:flutter_test/flutter_test.dart';
import 'package:lf_product_plugin/lf_product_plugin.dart';
import 'package:lf_product_plugin/lf_product_plugin_platform_interface.dart';
import 'package:lf_product_plugin/lf_product_plugin_method_channel.dart';
import 'package:plugin_platform_interface/plugin_platform_interface.dart';

class MockLfProductPluginPlatform
    with MockPlatformInterfaceMixin
    implements LfProductPluginPlatform {

  @override
  Future<String?> getPlatformVersion() => Future.value('42');
}

void main() {
  final LfProductPluginPlatform initialPlatform = LfProductPluginPlatform.instance;

  test('$MethodChannelLfProductPlugin is the default instance', () {
    expect(initialPlatform, isInstanceOf<MethodChannelLfProductPlugin>());
  });

  test('getPlatformVersion', () async {
    LfProductPlugin lfProductPlugin = LfProductPlugin();
    MockLfProductPluginPlatform fakePlatform = MockLfProductPluginPlatform();
    LfProductPluginPlatform.instance = fakePlatform;

    expect(await lfProductPlugin.getPlatformVersion(), '42');
  });
}
